﻿<pages:BaseSpeakerListEntityView
    x:Class="Conference.UX.WinPhone.Pages.SpeakerListEntityView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    
    xmlns:commandbinding="clr-namespace:Cirrious.MvvmCross.WindowsPhone.Commands;assembly=Cirrious.MvvmCross.WindowsPhone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mvx="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:pages="clr-namespace:Conference.UX.WinPhone.Pages"
    xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:tcl="clr-namespace:TeaLightV5.Foundation.UX.WinPhone.Controls;assembly=TeaLightV5.Foundation.Ux.WinPhone"
    xmlns:phonefx="clr-namespace:TeaLightV5.Foundation.Ux.WinPhone.Controls;assembly=TeaLightV5.Foundation.Ux.WinPhone"
    mvx:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <phone:Pivot Title="Speaker">
            <phone:PivotItem Header="Speakers">
                <Grid x:Name="ContentPanel">
                    <ListBox Grid.Row="1" Grid.Column="0" ItemsSource="{Binding Data}" HorizontalContentAlignment="Stretch" >
                        <ListBox.ItemTemplate>
                            <DataTemplate >
                                <tcl:StackPanel TapCommand="{Binding ReadCommand}" >
                                    <tcl:StackPanel DataContext="{Binding Data}" >
                                        <TextBlock Text="{Binding Name, Mode=TwoWay}" />
                                        <TextBlock Text="{Binding Title}" TextWrapping="Wrap"/>
                                    </tcl:StackPanel>
                                </tcl:StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>

                </Grid>
            </phone:PivotItem>

        </phone:Pivot>


        <tcl:BindableApplicationBar>
            <tcl:BindableApplicationBarIconButton IconUri="/images/appbar.add.rest.png" Text="Add" 
                                                      tcl:AppBarItemClick.Command="{Binding AddCommand}" />
            <tcl:BindableApplicationBarIconButton IconUri="/images/appbar.refresh.rest.png" Text="Refresh" 
                                                      tcl:AppBarItemClick.Command="{Binding RefreshCommand}" />
        </tcl:BindableApplicationBar>

    </Grid>


</pages:BaseSpeakerListEntityView>
